package index.oop.lesson;

public class User2 {
        //标准的javaBean
    //属性 (私有化的成员变量)
    //行为 特征 (方法)
    //构造函数 (空参,带全部参数的)
    //1.手机号
   private String phoneNumber;
    //2.验证码
   private String VirificationCode;
    //密码
   private String PassWord;
    //正则表达式
    //爱好
   private String hobby;
    //性别
   private String gender;
    // 针对每一个私有化的成员变量都要提供set()/get()
   //构造方法



    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public String getCode() {
        return VirificationCode;
    }

    public void setCode(String Code) {
       this.VirificationCode = Code;
    }

    public String getPassWord() {
        return PassWord;
    }

    public void setPassWord(String passWord) {
       this. PassWord = passWord;
    }

    public String getHobby() {
        return hobby;
    }

    public void setHobby(String hobby) {
        this.hobby = hobby;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public  User2(){

    }
    public User2(String phoneNumber,String virificationCode,String PassWord,String hobby,String gender ){
        this.phoneNumber=phoneNumber;
        this.VirificationCode=virificationCode;
        this.gender=gender;
        this.hobby=hobby;
        this.PassWord=PassWord;
    }

    @Override
    public String toString() {
        return "User2{" +
                "phoneNumber='" + phoneNumber + '\'' +
                ", VirificationCode='" + VirificationCode + '\'' +
                ", PassWord='" + PassWord + '\'' +
                ", hobby='" + hobby + '\'' +
                ", gender='" + gender + '\'' +
                '}';
    }
    public  void sendCode2(String virificationCode){
        System.out.println("验证码为"+virificationCode);
    }
    public  void register(){
        System.out.println("already register");
        System.out.println("验证成功,");
        System.out.println("登录成功");
    }
}
